﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Laharsub.Server.Wcf
{
    public class PubSubMessage
    {
        public int TopicId { get; set; }
        public int MessageId { get; set; }
        public string ContentType { get; set; }
        public byte[] Body { get; set; }

        public string GetBodyAsString()
        {
            if (this.Body == null)
            {
                return null;
            }
            else
            {
                return Encoding.UTF8.GetString(this.Body);
            }
        }
    }
}
